﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="../src/utilFn.js"></script>
    <script src="../utilPackage/jquery-1.11.3.min.js"></script>
    <link href="../utilPackage/utilFn.css" rel="stylesheet" />
</head>
<body>
    <div class="subPage">
        <div class="subPage-title">
            字符串处理常用的方法
        </div>
        <div class="subPage-sub-title"></div>
        <div id="trim" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>trim</strong> </span> <span class="title-type">Function(String)</span> </div>
         
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted"
                     style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">     </span><span class="com">//*-------------------去掉头尾的空格号//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">trim</span><span class="pun">(</span><span class="str">' nihao '</span><span class="pun">);</span><span class="com">//去掉头尾空格号</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">trim</span><span class="pun">(</span><span class="str">' nihao'</span><span class="pun">);</span><span class="com">//去掉头尾空格号</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">trim</span><span class="pun">(</span><span class="str">'nihao '</span><span class="pun">);</span><span class="com">//去掉头尾空格号</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">trim</span><span class="pun">(</span><span class="str">'ni hao'</span><span class="pun">);</span><span class="com">//去掉头尾空格号</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'ni hao';</span></code></li></ol></pre>

            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.trim(String)<br />
                    //就是输入一个字符串把头尾两端的空格号去掉<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="trimInput" class="InputTextarea"> nihao </textarea>
                </div>
                <div> <input id="trimButton" type="button" value="执行 g.trim(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="trimOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#trimButton").click(function () {
                        var str1 = $('#trimInput').val();
                        var str2 = g.trim(str1);
                        $('#trimOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="lTrim" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>lTrim</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">  </span><span class="com">//*-------------------去掉左边的空格号//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">lTrim</span><span class="pun">(</span><span class="str">' nihao '</span><span class="pun">);</span><span class="com">//去掉左边的空格号</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao ';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">lTrim</span><span class="pun">(</span><span class="str">' nihao'</span><span class="pun">);</span><span class="com">//去掉左边的空格号</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">lTrim</span><span class="pun">(</span><span class="str">'nihao '</span><span class="pun">);</span><span class="com">//去掉左边的空格号</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao ';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">lTrim</span><span class="pun">(</span><span class="str">'ni hao'</span><span class="pun">);</span><span class="com">//去掉左边的空格号</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'ni hao';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.lTrim(String)<br />
                    //就是输入一个字符串将左边的空格号去掉<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="lTrimInput" class="InputTextarea"> nihao </textarea>
                </div>
                <div> <input id="lTrimButton" type="button" value="执行 g.lTrim(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="lTrimOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#lTrimButton").click(function () {
                        var str1 = $('#lTrimInput').val();
                        var str2 = g.lTrim(str1);
                        $('#lTrimOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="rTrim" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>rTrim</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">  </span><span class="com">//*-------------------去掉右边的空格号//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">rTrim</span><span class="pun">(</span><span class="str">' nihao '</span><span class="pun">);</span><span class="com">//去掉右边的空格号</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是' nihao';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">rTrim</span><span class="pun">(</span><span class="str">' nihao'</span><span class="pun">);</span><span class="com">//去掉右边的空格号</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是' nihao';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">rTrim</span><span class="pun">(</span><span class="str">'nihao '</span><span class="pun">);</span><span class="com">//去掉右边的空格号</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao ';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">rTrim</span><span class="pun">(</span><span class="str">'ni hao'</span><span class="pun">);</span><span class="com">//去掉右边的空格号</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'ni hao';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.rTrim(String)<br />
                    //就是输入一个字符串把将右边的空格号去掉<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="rTrimInput" class="InputTextarea"> nihao </textarea>
                </div>
                <div>
                    <input id="rTrimButton" type="button" value="执行 g.rTrim(String)" />
                </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="rTrimOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#rTrimButton").click(function () {
                        var str1 = $('#rTrimInput').val();
                        var str2 = g.rTrim(str1);
                        $('#rTrimOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="resetBlank" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>resetBlank</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">       </span><span class="com">//*-------------------就是输入一个字符串将多个空白合并为一个空白 ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">resetBlank</span><span class="pun">(</span><span class="str">'  ni  h  ao  '</span><span class="pun">);</span><span class="com">//合成一个空格符</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是' ni h ao ';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">resetBlank</span><span class="pun">(</span><span class="str">'ni   h   ao'</span><span class="pun">);</span><span class="com">//合成一个空格符</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是' ni h ao';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">resetBlank</span><span class="pun">(</span><span class="str">'   nihao  '</span><span class="pun">);</span><span class="com">//合成一个空格符</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是' nihao  ';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">resetBlank</span><span class="pun">(</span><span class="str">'nihao'</span><span class="pun">);</span><span class="com">//合成一个空格符</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'nihao';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.resetBlank(String)<br />
                    //就是输入一个字符串将多个空白合并为一个空白  <br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="resetBlankInput" class="InputTextarea">  ni  h  ao  </textarea>
                </div>
                <div> <input id="resetBlankButton" type="button" value="执行 g.resetBlank(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="resetBlankOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#resetBlankButton").click(function () {
                        var str1 = $('#resetBlankInput').val();
                        var str2 = g.resetBlank(str1);
                        $('#resetBlankOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getNum" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getNum</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">     </span><span class="com">//*-------------------获取字符串中的数字 ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getNum</span><span class="pun">(</span><span class="str">'  122n123  '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'122123';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getNum</span><span class="pun">(</span><span class="str">'122n  123'</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'122123';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getNum</span><span class="pun">(</span><span class="str">'-12309.20md'</span><span class="pun">);</span><span class="com">//获取字符串中的数字（不包括-和.）</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'1230920';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getNum</span><span class="pun">(</span><span class="str">' 0012y309md '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'0012309';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getNum(String)<br />
                    //就是输入一个字符串将保留字符串中的数字 <br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getNumInput" class="InputTextarea">  122n123  </textarea>
                </div>
                <div> <input id="getNumButton" type="button" value="执行 g.getNum(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getNumOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getNumButton").click(function () {
                        var str1 = $('#getNumInput').val();
                        var str2 = g.getNum(str1);
                        $('#getNumOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getInt" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getInt</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">  </span><span class="com">//*-------------------获取字符串中的数字(包括负号) ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getInt</span><span class="pun">(</span><span class="str">'  122n123  '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'122123';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getInt</span><span class="pun">(</span><span class="str">'-12-2n123'</span><span class="pun">);</span><span class="com">//获取字符串中的数字 </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'-12-2123';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getInt</span><span class="pun">(</span><span class="str">'-12309.20md'</span><span class="pun">);</span><span class="com">//获取字符串中的数字（不包括.）</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'-1230920';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getInt</span><span class="pun">(</span><span class="str">' 0012y309md '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'0012309';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getInt(String)<br />
                    //就是输入一个字符串将保留字符串中的整数 <br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getIntInput" class="InputTextarea">  122n123  </textarea>
                </div>
                <div> <input id="getIntButton" type="button" value="执行 g.getInt(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getIntOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getIntButton").click(function () {
                        var str1 = $('#getIntInput').val();
                        var str2 = g.getInt(str1);
                        $('#getIntOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getFloat" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getFloat</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------获取字符串中的数字(包括负号和点号) ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFloat</span><span class="pun">(</span><span class="str">' -n12.ih34ao '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'-12.34';</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFloat</span><span class="pun">(</span><span class="str">' -n12.-ih34ao '</span><span class="pun">);</span><span class="com">//获取字符串中的数字 </span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'-12.-34';</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFloat</span><span class="pun">(</span><span class="str">' 00n12.ih34ao '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'0012.34';</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFloat</span><span class="pun">(</span><span class="str">' 12y309.00md '</span><span class="pun">);</span><span class="com">//获取字符串中的数字</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'12309.00';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getFloat(String)<br />
                    //就是输入一个字符串，将保留字符串中的实数（包括小数）<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getFloatInput" class="InputTextarea"> -n12.ih34ao </textarea>
                </div>
                <div> <input id="getFloatButton" type="button" value="执行 g.getFloat(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getFloatOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getFloatButton").click(function () {
                        var str1 = $('#getFloatInput').val();
                        var str2 = g.getFloat(str1);
                        $('#getFloatOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getCN" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getCN</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">             </span><span class="com">//*-------------------保留字符中的中文 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCN</span><span class="pun">(</span><span class="str">' 123123大小多少14345aad '</span><span class="pun">);</span><span class="com">//保留字符中的中文</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'大小多少';</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCN</span><span class="pun">(</span><span class="str">' 123123大小多少？。，14345aad ./'</span><span class="pun">);</span><span class="com">//保留字符中的中文（不包括中文符号）</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'大小多少';</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCN</span><span class="pun">(</span><span class="str">' 大12小23多12少1 '</span><span class="pun">);</span><span class="com">//保留字符中的中文</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'大小多少';</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCN</span><span class="pun">(</span><span class="str">' 大12小  23  多12少1 '</span><span class="pun">);</span><span class="com">//保留字符中的中文</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'大小多少';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getCN(String)<br />
                    //就是输入一个字符串，取得字符串里面的中文字符<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getCNInput" class="InputTextarea"> 123123大小多少14345aad </textarea>
                </div>
                <div> <input id="getCNButton" type="button" value="执行 g.getCN(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getCNOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getCNButton").click(function () {
                        var str1 = $('#getCNInput').val();
                        var str2 = g.getCN(str1);
                        $('#getCNOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="toInt" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>toInt</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------将字符串转为Number类型(整数类型) ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toInt</span><span class="pun">(</span><span class="str">'-123.01元'</span><span class="pun">);</span><span class="com">//转为Number类型</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'-123';</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toInt</span><span class="pun">(</span><span class="str">'a123.65'</span><span class="pun">);</span><span class="com">//只要开始不是数据就不会保留</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'null';</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toInt</span><span class="pun">(</span><span class="str">'123.23abx大'</span><span class="pun">);</span><span class="com">//保留数字</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'123';</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toInt</span><span class="pun">(</span><span class="str">'123.2.3abx'</span><span class="pun">);</span><span class="com">//保留数字</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'123';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.toInt(String)<br />
                    //将字符串转为Number类型，如果转化失败返回null<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="toIntInput" class="InputTextarea">-123.01元</textarea>
                </div>
                <div> <input id="toIntButton" type="button" value="执行 g.toInt(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="toIntOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#toIntButton").click(function () {
                        var str1 = $('#toIntInput').val();
                        var str2 = g.toInt(str1);
                        $('#toIntOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getLen" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getLen</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">              </span><span class="com">//*-------------------获取字符串的字节长度 ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getLen</span><span class="pun">(</span><span class="str">'-123.01元'</span><span class="pun">);</span><span class="com">//中文2个字节</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'9';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getLen</span><span class="pun">(</span><span class="str">'a123.65'</span><span class="pun">);</span><span class="com">//</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'7';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getLen</span><span class="pun">(</span><span class="str">'123.23abx大大'</span><span class="pun">);</span><span class="com">//</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'13';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getLen</span><span class="pun">(</span><span class="str">',. [] 小'</span><span class="pun">);</span><span class="com">//符号一个字节，中文2个字节</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'8';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getLen(String)<br />
                    //获取字符串的字节长度<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getLenInput" class="InputTextarea">-123.01元</textarea>
                </div>
                <div> <input id="getLenButton" type="button" value="执行 g.getLen(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getLenOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getLenButton").click(function () {
                        var str1 = $('#getLenInput').val();
                        var str2 = g.getLen(str1);
                        $('#getLenOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getCount" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getCount</strong> </span> <span class="title-type">Function(String,Number)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">            </span><span class="com">//*-------------------获取字符串长度 ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCount</span><span class="pun">(</span><span class="str">'相机|手机|太阳'</span><span class="pun">);</span><span class="com">//获取字符串长度</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'8';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCount</span><span class="pun">(</span><span class="str">'相机|手机|太阳'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'|'</span><span class="pun">);</span><span class="com">//分隔后的长度    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'3';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCount</span><span class="pun">(</span><span class="str">'相机||手机||太阳'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'||'</span><span class="pun">);</span><span class="com">//分隔后的长度  </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'3';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getCount</span><span class="pun">(</span><span class="str">'相机ab手机ab太阳'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ab'</span><span class="pun">);</span><span class="com">//分隔后的长度  </span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'3';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getCount(String,Number)<br />
                    //获取字符串及分隔后的长度<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getCountInput" class="InputTextarea">相机|手机|太阳</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[Number]</b>：<input id="getCountCanshu1" type="text" value="|" /></div>
                <div> <input id="getCountButton" type="button" value="执行 g.getCount(String,Number)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getCountOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getCountButton").click(function () {
                        var str1 = $('#getCountInput').val();
                        var canshu1 = $('#getCountCanshu1').val();
                        var str2 = g.getCount(str1, canshu1);
                        $('#getCountOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getFileName" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getFileName</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"><span class="pln">              </span><span class="com">//*-------------------获取路径下的文件名（包括后缀名） ---//</span></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileName</span><span class="pun">(</span><span class="str">'http://localhost:7184/Public/utilFn/utilFn_explain.txt'</span><span class="pun">);</span><span class="com">//获取文件名（会返回后缀名）</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'utilFn_explain.txt';</span></code></li><li class="L5"><code class="lang-javascript"></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileName</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/utilFn_explain.txt'</span><span class="pun">);</span><span class="com">//获取文件名</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'utilFn_explain.txt';</span></code></li><li class="L9"><code class="lang-javascript"></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileName</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/utilFn_explain'</span><span class="pun">);</span><span class="com">//获取文件名（没有后缀名会返回文件名）</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'utilFn_explain';</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileName</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/'</span><span class="pun">);</span><span class="com">//获取文件名</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getFileName(String)<br />
                    //就是输入一个字符串，获取文件名称（包括文件的扩展名）<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getFileNameInput" class="InputTextarea">http://localhost:7184/Public/utilFn/utilFn_explain.txt</textarea>
                </div>
                <div> <input id="getFileNameButton" type="button" value="执行 g.getFileName(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getFileNameOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getFileNameButton").click(function () {
                        var str1 = $('#getFileNameInput').val();
                        var str2 = g.getFileName(str1);
                        $('#getFileNameOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getFileExt" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getFileExt</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">             </span><span class="com">//*-------------------获取后缀名（扩展名） ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileExt</span><span class="pun">(</span><span class="str">'http://localhost:7184/Public/utilFn/utilFn_explain.txt'</span><span class="pun">);</span><span class="com">//获取后缀名</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'txt';</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileExt</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/utilFn_explain.txt'</span><span class="pun">);</span><span class="com">//获取后缀名</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'txt';</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileExt</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/utilFn_explain'</span><span class="pun">);</span><span class="com">//(必须有后缀名，否则返回全部)</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'C:/Public/utilFn/utilFn_explain';</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getFileExt</span><span class="pun">(</span><span class="str">'C:/Public/utilFn/'</span><span class="pun">);</span><span class="com">//(必须有后缀名，否则返回全部)</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是'C:/Public/utilFn/';</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getFileExt(String)<br />
                    //就是输入一个字符串，获取扩展名<br />
                    如果没有后缀名，返回原字符串<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="getFileExtInput" class="InputTextarea">http://localhost:7184/Public/utilFn/utilFn_explain.txt</textarea>
                </div>
                <div> <input id="getFileExtButton" type="button" value="执行 g.getFileExt(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getFileExtOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getFileExtButton").click(function () {
                        var str1 = $('#getFileExtInput').val();
                        var str2 = g.getFileExt(str1);
                        $('#getFileExtOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="getQueryString" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>getQueryString</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">               </span><span class="com">//*-------------------获取本网页的URL参数 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getQueryString</span><span class="pun">(</span><span class="str">'name'</span><span class="pun">);</span><span class="com">//获取URL中'name'参数值</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getQueryString</span><span class="pun">(</span><span class="str">'id'</span><span class="pun">);</span><span class="com">//获取URL中'id'参数值</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">getQueryString</span><span class="pun">(</span><span class="str">'state'</span><span class="pun">);</span><span class="com">//获取URL中'state'参数值</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.getQueryString(String)<br />
                    //根据参数名获取网页的参数<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div style="padding:10px;">参数1<b>[String]</b>：<input id="getQueryStringCanshu1" type="text" value="id" /></div>
                <div> <input id="getQueryStringButton" type="button" value="执行 g.getQueryString(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="getQueryStringOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#getQueryStringButton").click(function () {
                        var canshu1 = $('#getQueryStringCanshu1').val();
                        var str2 = g.getQueryString(canshu1);
                        $('#getQueryStringOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="replaceAll" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>replaceAll</strong> </span> <span class="title-type">Function(String,String,String,Boolean)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">              </span><span class="com">//*-------------------将字符串中所有的字符串替换另一个字符串 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">replaceAll</span><span class="pun">(</span><span class="str">'aBcDefg'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'aB'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'A'</span><span class="pun">);</span><span class="com">//将aB替换为A</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是AcDefg</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">replaceAll</span><span class="pun">(</span><span class="str">'aBcDefg'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ab'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'A'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="com">//将aB替换为A,aB区分大小写</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是aBcDefg</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">replaceAll</span><span class="pun">(</span><span class="str">'aBcDefg'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ab'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'A'</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">);</span><span class="com">//将aB替换为A,aB不区分大小写</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是AcDefg</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">replaceAll</span><span class="pun">(</span><span class="str">'aBcDeaBfg'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'aB'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'A'</span><span class="pun">);</span><span class="com">//将aB替换为A,aB区分大小写</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是AcDeAfg</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.replaceAll(String,String1,String2,Boolean) <br />
                    //字符串，被替换的，要替换的，是否区分大小写 true:表示不区分<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="replaceAllInput" class="InputTextarea">aBcDefg</textarea>
                </div>
                <div style="padding:10px;line-height:32px;">
                    参数1<b>[String1]</b>：<input id="replaceAllCanshu1" type="text" value="aB" /><br />
                    参数2<b>[String2]</b>：<input id="replaceAllCanshu2" type="text" value="A" /><br />
                    参数3<b>[Boolean]</b>：<input id="replaceAllCanshu3" type="text" value="false" /> <br />
                </div>
                <div> <input id="replaceAllButton" type="button" value="执行  g.replaceAll(String,String1,String2,Boolean)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="replaceAllOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#replaceAllButton").click(function () {
                        var str1 = $('#replaceAllInput').val();
                        var canshu1 = $('#replaceAllCanshu1').val();
                        var canshu2 = $('#replaceAllCanshu2').val();
                        var canshu3 = eval($('#replaceAllCanshu3').val());
                        var str2 = g.replaceAll(str1, canshu1, canshu2, canshu3);
                        $('#replaceAllOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="toDate" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>toDate</strong> </span> <span class="title-type">Function(String,Number)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">              </span><span class="com">//*-------------------将字符串String转为时间Date ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toDate</span><span class="pun">(</span><span class="str">'2000-10-12 12:14:30'</span><span class="pun">);</span><span class="com">//将字符串转为时间</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是Thu Oct 12 2000 12:14:30 GMT+0800 (中国标准时间)</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toDate</span><span class="pun">(</span><span class="str">'2000/10/12 12:14:30'</span><span class="pun">);</span><span class="com">//将字符串转为时间</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是Thu Oct 12 2000 12:14:30 GMT+0800 (中国标准时间)</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toDate</span><span class="pun">(</span><span class="str">'\/Date(-62135596800000)\/'</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2</span><span class="pun">);</span><span class="com">//将字符串转为时间</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是Mon Jan 01    1 08:00:00 GMT+0800 (中国标准时间)</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toDate</span><span class="pun">(</span><span class="pln">\/</span><span class="typ">Date</span><span class="pun">(</span><span class="lit">62135596800000</span><span class="pun">)</span><span class="pln">\/</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2</span><span class="pun">);</span><span class="com">//将字符串转为时间</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是Sun Jan 01 3939 08:00:00 GMT+0800 (中国标准时间)</span></code></li><li class="L8"><code class="lang-javascript"></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如5：</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toDate</span><span class="pun">(</span><span class="str">'6954546654654'</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2</span><span class="pun">);</span><span class="com">//将字符串转为时间</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1是Wed May 19 2190 18:30:54 GMT+0800 (中国标准时间)</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.toDate(String,Number)<br />
                    //将字符串转化为时间 Number参数默认为1<br />
                    //Number为1代表的是格式<br />
                    //Number为2代表的是获取数字 将数字转为时间<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="toDateInput" class="InputTextarea">2000-10-12 12:14:30</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[Number]</b>：<input id="toDateCanshu1" type="text" value="1" /></div>
                <div> <input id="toDateButton" type="button" value="执行 g.toDate(String,Number)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="toDateOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#toDateButton").click(function () {
                        var str1 = $('#toDateInput').val();
                        var canshu1 = $('#toDateCanshu1').val();
                        var str2 = g.toDate(str1, canshu1);
                        $('#toDateOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="like" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>like</strong> </span> <span class="title-type">Function(String,String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------将字符串String是否存在相似的字符返回Boolean ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//参数1包含参数2默认为%bc%</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：</span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'%bc'</span><span class="pun">);</span><span class="com">//将字符串是不是bc结尾</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false，右边一样右边必须是bc;</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：</span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'abcdefghijkbc'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'%bc'</span><span class="pun">);</span><span class="com">//将字符串是不是bc结尾</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true，右边一样右边必须是bc;</span></code></li><li class="L4"><code class="lang-javascript"></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'%bc%'</span><span class="pun">);</span><span class="com">//字符串中是否包含bc</span></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L8"><code class="lang-javascript"></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如5：</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc%'</span><span class="pun">);</span><span class="com">//字符串是不是bc开头</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false，左边一样的，就是左边必须是bc</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如6：</span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">like</span><span class="pun">(</span><span class="str">'bcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc%'</span><span class="pun">);</span><span class="com">//字符串是不是bc开头</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true，左边一样的，就是左边必须是bc</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.like(String,String1)<br />
                    //是否存在相似的字符<br />
                    //String1中%表示模糊
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="likeInput" class="InputTextarea">abcdefghijkbc</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[String1]</b>：<input id="likeCanshu1" type="text" value="%bc" /></div>
                <div> <input id="likeButton" type="button" value="执行 g.like(String,String1)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="likeOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#likeButton").click(function () {
                        var str1 = $('#likeInput').val();
                        var canshu1 = $('#likeCanshu1').val();
                        var str2 = g.like(str1, canshu1);
                        $('#likeOutput').val(str2);
                    });
                </script>
            </div>
        </div>
        <div id="isLike" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>isLike</strong> </span> <span class="title-type">Function(String,String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------将字符串String是否存在相似的字符返回Boolean ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLike</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否包含bc</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLike</span><span class="pun">(</span><span class="str">'bcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否包含bc</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLike</span><span class="pun">(</span><span class="str">'cdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否包含bc</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false;</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.isLike(String,String1)<br />
                    //String是否包含String1<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="isLikeInput" class="InputTextarea">abcdefghijk</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[String1]</b>：<input id="isLikeCanshu1" type="text" value="bc" /></div>
                <div> <input id="isLikeButton" type="button" value="执行 g.isLike(String,String1)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="isLikeOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#isLikeButton").click(function () {
                        var str1 = $('#isLikeInput').val();
                        var canshu1 = $('#isLikeCanshu1').val();
                        var str2 = g.isLike(str1, canshu1);
                        $('#isLikeOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="isLeftLike" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>isLeftLike</strong> </span> <span class="title-type">Function(String,String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------字符串中是否以某个字符串开头 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLeftLike</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc开头</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLeftLike</span><span class="pun">(</span><span class="str">'bcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc开头</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isLeftLike</span><span class="pun">(</span><span class="str">'cdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc开头</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false;</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.isLeftLike(String,String1)<br />
                    //String1是否是String2开头<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="isLeftLikeInput" class="InputTextarea">bcdefghijk</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[String1]</b>：<input id="isLeftLikeCanshu1" type="text" value="bc" /></div>
                <div> <input id="isLeftLikeButton" type="button" value="执行 g.isLeftLike(String,String1)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="isLeftLikeOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#isLeftLikeButton").click(function () {
                        var str1 = $('#isLeftLikeInput').val();
                        var canshu1 = $('#isLeftLikeCanshu1').val();
                        var str2 = g.isLeftLike(str1, canshu1);
                        $('#isLeftLikeOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="isRightLike" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>isRightLike</strong> </span> <span class="title-type">Function(String,String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                  </span><span class="com">//*-------------------字符串中是否以某个字符串结尾 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isRightLike</span><span class="pun">(</span><span class="str">'abcdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc结尾</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isRightLike</span><span class="pun">(</span><span class="str">'bcdefghijkbc'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc结尾</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是true;</span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">isRightLike</span><span class="pun">(</span><span class="str">'cdefghijk'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'bc'</span><span class="pun">);</span><span class="com">//是否以bc结尾</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是false;</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.isRightLike(String,String1)<br />
                    //String是否以String1结尾<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="isRightLikeInput" class="InputTextarea">abcdefghijk</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[String1]</b>：<input id="isRightLikeCanshu1" type="text" value="bc" /></div>
                <div> <input id="isRightLikeButton" type="button" value="执行  g.isRightLike(String,String1)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="isRightLikeOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#isRightLikeButton").click(function () {
                        var str1 = $('#isRightLikeInput').val();
                        var canshu1 = $('#isRightLikeCanshu1').val();
                        var str2 = g.isRightLike(str1, canshu1);
                        $('#isRightLikeOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="cuter" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>cuter</strong> </span> <span class="title-type">Function(String,Number)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                  </span><span class="com">//*-------------------将数字用逗号分隔， ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln">g</span><span class="pun">.</span><span class="pln">cuter</span><span class="pun">(</span><span class="lit">123456789</span><span class="pun">);</span><span class="com">//就是千位符号 第一参数默认为3</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是123,456,789;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">cuter</span><span class="pun">(</span><span class="lit">123456789</span><span class="pun">,</span><span class="lit">4</span><span class="pun">);</span><span class="com">//就是万位符号</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是1,2345,6789;</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.cuter(String,Number)<br />
                    //千分符号Number代表间隔<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="cuterInput" class="InputTextarea">123456789</textarea>
                </div>
                <div style="padding:10px;">参数1<b>[Number]</b>：<input id="cuterCanshu1" type="text" value="3" /></div>
                <div> <input id="cuterButton" type="button" value="执行 g.cuter(String,Number)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="cuterOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#cuterButton").click(function () {
                        var str1 = $('#cuterInput').val();
                        var canshu1 = $('#cuterCanshu1').val();
                        var str2 = g.cuter(str1, canshu1);
                        $('#cuterOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="xmlClear" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>xmlClear</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                   </span><span class="com">//*-------------------去掉xml标签， ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">xmlClear</span><span class="pun">(</span><span class="str">'&lt;a&gt;nihao&lt;/a&gt;'</span><span class="pun">);</span><span class="com">//去掉xml标签</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是nihao;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">xmlClear</span><span class="pun">(</span><span class="str">'&lt;a&gt;123456&lt;br /&gt;&lt;/a&gt;'</span><span class="pun">);</span><span class="com">//去掉xml标签</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是123456      </span></code></li><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">xmlClear</span><span class="pun">(</span><span class="str">'&lt;a class="color"&gt;123456&lt;br /&gt;&lt;/a&gt;'</span><span class="pun">);</span><span class="com">//去掉xml标签</span></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是123456</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.xmlClear(String)<br />
                    //就是将字符串中的所有的标签去掉<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="xmlClearInput" class="InputTextarea">&lt;a&gt;nihao&lt;/a&gt;</textarea>
                </div>
                <div> <input id="xmlClearButton" type="button" value="执行 g.xmlClear(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="xmlClearOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#xmlClearButton").click(function () {
                        var str1 = $('#xmlClearInput').val();
                        var str2 = g.xmlClear(str1);
                        $('#xmlClearOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="sameCharNumber" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>sameCharNumber</strong> </span> <span class="title-type">Function(String,String,Number)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                   </span><span class="com">//*-------------------求出相同字符相邻的个数， ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">sameCharNumber</span><span class="pun">(</span><span class="str">'床前___________,疑是___________.举头望______,低头思______.'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'_'</span><span class="pun">,</span><span class="pln"> </span><span class="lit">4</span><span class="pun">);</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//'_'表示相同的字符，4表示，至少要4个</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是[11,11,6,6];</span></code></li><li class="L7"><code class="lang-javascript"></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">sameCharNumber</span><span class="pun">(</span><span class="str">'床前          ,疑是              .举头望        ,低头思       .'</span><span class="pun">,</span><span class="pln"> </span><span class="str">' '</span><span class="pun">,</span><span class="pln"> </span><span class="lit">4</span><span class="pun">);</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//' '表示相同的字符，4表示，至少要4个</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是[10,14,8,7];    </span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">sameCharNumber</span><span class="pun">(</span><span class="str">'床前********,疑是************.举头望**********,低头思**********.'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'*'</span><span class="pun">,</span><span class="pln"> </span><span class="lit">4</span><span class="pun">);</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//'*'表示相同的字符，4表示，至少要4个</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是[8,12,10,10];</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.sameCharNumber(String,String1,Number) <br />
                    //求出字符串中重复相同字符的个数组 //返回一个数组<br />
                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="sameCharNumberInput" class="InputTextarea">床前___________,疑是___________.举头望______,低头思______.</textarea>
                </div>
                <div style="padding:10px;line-height:32px;">
                    参数1<b>[String1]</b>：<input id="sameCharNumberCanshu1" type="text" value="_" /><br />
                    参数2<b>[Number]</b>：<input id="sameCharNumberCanshu2" type="text" value="4" />
                </div>
                <div> <input id="sameCharNumberButton" type="button" value="执行  g.sameCharNumber(String,String1,Number)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="sameCharNumberOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#sameCharNumberButton").click(function () {
                        var str1 = $('#sameCharNumberInput').val();
                        var canshu1 = $('#sameCharNumberCanshu1').val();
                        var canshu2 = $('#sameCharNumberCanshu2').val();
                        var str2 = g.sameCharNumber(str1, canshu1, canshu2);
                        $('#sameCharNumberOutput').val(JSON.stringify(str2));
                    });
                </script>
            </div>
        </div>

        <div id="guid" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>guid</strong> </span> <span class="title-type">Function(Number,Number)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                  </span><span class="com">//*-------------------取得一个随机数 ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">guid</span><span class="pun">();</span><span class="com">// 获取随机码</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//默认为36位的GUID码</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是格式为 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX随机数;</span></code></li><li class="L7"><code class="lang-javascript"></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">guid</span><span class="pun">(</span><span class="lit">8</span><span class="pun">);</span><span class="com">// 获取随机码</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//8位64进制的随机数</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是格式为 XXXXXXXX随机数;</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如3：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">guid</span><span class="pun">(</span><span class="lit">8</span><span class="pun">,</span><span class="lit">16</span><span class="pun">);</span><span class="com">// 获取随机码</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="com">//8位16进制的随机数</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是格式为 XXXXXXXX随机数;</span></code></li><li class="L7"><code class="lang-javascript"></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如4：    </span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">guid</span><span class="pun">(</span><span class="lit">4</span><span class="pun">,</span><span class="pln"> </span><span class="lit">16</span><span class="pun">);</span><span class="com">// 获取随机码</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                </span><span class="com">//位16进制的随机数</span></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是格式为 XXXXXXXX随机数;</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.guid(Number1,Number2)<br />
                    //获取随机码，Number1表示随机码的长度，默认为36位码，Number2表示进制，默认为64进制<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div style="padding:10px;line-height:32px;">
                    参数1<b>[Number1]</b>：<input id="guidCanshu1" type="text" value="" /><br />
                    参数2<b>[Number2]</b>：<input id="guidCanshu2" type="text" value="" />
                </div>
                <div> <input id="guidButton" type="button" value="执行 g.guid(Number1,Number2)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="guidOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#guidButton").click(function () {
                        var canshu1 = $('#guidCanshu1').val();
                        var canshu2 = $('#guidCanshu2').val();
                        var str2 = g.guid(canshu1, canshu2);
                        $('#guidOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="toUnicode" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>toUnicode</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"><span class="pln">                 </span><span class="com">//*-------------------将汉字转为unicode， ---//</span></code></li><li class="L2"><code class="lang-javascript"></code></li><li class="L3"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toUnicode</span><span class="pun">(</span><span class="str">'大大小小1212'</span><span class="pun">);</span><span class="com">//将汉字转为unicode</span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是\u5927\u5927\u5c0f\u5c0f\u31\u32\u31\u32;</span></code></li><li class="L6"><code class="lang-javascript"></code></li><li class="L7"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toUnicode</span><span class="pun">(</span><span class="str">'acb大大小小1212'</span><span class="pun">);</span><span class="com">//将汉字转为unicode</span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是\u61\u63\u62\u5927\u5927\u5c0f\u5c0f\u31\u32\u31\u32</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.toUnicode(String)<br />
                    //就是将汉字转为unicode<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="toUnicodeInput" class="InputTextarea">大大小小1212</textarea>
                </div>
                <div> <input id="toUnicodeButton" type="button" value="执行 g.toUnicode(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="toUnicodeOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#toUnicodeButton").click(function () {
                        var str1 = $('#toUnicodeInput').val();
                        var str2 = g.toUnicode(str1);
                        $('#toUnicodeOutput').val(str2);
                    });
                </script>
            </div>
        </div>

        <div id="toHanzi" class="subPage-part">
            <div class="subPage-part-title"><span class="title-name">g.<strong>toHanzi</strong> </span> <span class="title-type">Function(String)</span> </div>
            <div class="subPage-part-code">
                <pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-javascript"></code></li><li class="L1"><code class="lang-javascript"></code></li><li class="L2"><code class="lang-javascript"><span class="pln">                </span><span class="com">//*-------------------将Unicode转中文， ---//</span></code></li><li class="L3"><code class="lang-javascript"></code></li><li class="L4"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如1：    </span></code></li><li class="L5"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toHanzi</span><span class="pun">(</span><span class="str">'\u5927\u5927\u5c0f\u5c0f\u31\u32\u31\u32'</span><span class="pun">);</span><span class="com">//Unicode转中文</span></code></li><li class="L6"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是大大小小1212</span></code></li><li class="L7"><code class="lang-javascript"></code></li><li class="L8"><code class="lang-javascript"><span class="pln">                </span><span class="com">//例如2：    </span></code></li><li class="L9"><code class="lang-javascript"><span class="pln">                </span><span class="kwd">var</span><span class="pln"> str1 </span><span class="pun">=</span><span class="pln"> g</span><span class="pun">.</span><span class="pln">toHanzi</span><span class="pun">(</span><span class="str">'\u61\u63\u62\u5927\u5927\u5c0f\u5c0f\u31\u32\u31\u32'</span><span class="pun">);</span><span class="com">//Unicode转中文</span></code></li><li class="L0"><code class="lang-javascript"><span class="pln">                console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">str1</span><span class="pun">);</span><span class="com">//str1就是acb大大小小1212</span></code></li></ol></pre>
            </div>
            <div class="subPage-part-explain">
                <tt>
                    g.toHanzi(String)<br />
                    //就是将Unicode转中文<br />

                </tt>
            </div>
            <div class="subPage-part-explain">
                <div><b>测试方法</b></div>
                <div>
                    请输入字符串<b>[String]</b>
                </div>
                <div>
                    <textarea id="toHanziInput" class="InputTextarea">\u5927\u5927\u5c0f\u5c0f\u31\u32\u31\u32</textarea>
                </div>
                <div> <input id="toHanziButton" type="button" value="执行 g.toHanzi(String)" /> </div>
                <div>
                    显示结果
                </div>
                <div>
                    <textarea id="toHanziOutput" class="OutputTextarea"></textarea>
                </div>
                <script>
                    $("#toHanziButton").click(function () {
                        var str1 = $('#toHanziInput').val();
                        var str2 = g.toHanzi(str1);
                        $('#toHanziOutput').val(str2);
                    });
                </script>
            </div>
        </div>
    </div>
</body>
</html>